 package com.cxl.pattern.observer;
 
 import java.io.PrintStream;
 import java.util.Observable;
 
 public class Product extends Observable
 {
   private String name;
   private float price;
 
   public String getName()
   {
     return this.name;
   }
 
   public void setName(String name) {
     this.name = name;
 
     setChanged();
     notifyObservers(name);
   }
 
   public float getPrice() {
     return this.price;
   }
 
   public void setPrice(float price) {
     this.price = price;
 
     setChanged();
     notifyObservers(new Float(price));
   }
 
   public void saveToDb()
   {
     System.out.println("saveToDb");
   }
 }

/* Location:           E:\work\eclipse3.6_\workspace\design_pattern\
 * Qualified Name:     com.cxl.pattern.observer.Product
 * JD-Core Version:    0.6.1
 */